﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Hired1Div.master" AutoEventWireup="true" CodeBehind="empregister.aspx.cs" Inherits="Hired.empregister" %>
<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="HeadPlaceHolder">
    <style type="text/css">
         .line_account
        {
            float: left;
            margin-left: 9px;
            width: 1002px;
            height: 19px;
            background: url(images/Account-Text.png);
        }
        .line_companyinfo
        {
            float: left;
            margin-left: 10px;
            width: 997px;
            height: 19px;
            background: url(images/lineCompanyInfo.png);
        }
        .line_personalparticulars
        {
            float: left;
            margin-left: 10px;
            width: 997px;
            height: 19px;
            background: url(images/linePersonalParticulars.png);
        }
        .particularsinfo
        {
            float: left;
            margin-left: 130px;
            margin-top: 3px;
            font-family: "Trebuchet MS";
            font-size: 75%;
        }
        .line_uploaddoc
        {
            float: left;
            margin-top: 40px;
            margin-left: 10px;
            width: 997px;
            height: 20px;
            background: url(images/lineUploadDoc.png);
        }
        .ca1
        {
            width: 170px;
        }
        
        .ca2
        {
            width: 370px;
        }
        
        .ca3
        {
            width: 185px;
        }
        
        .ca4
        {
            width: 265px;
        }
        
        .ca_submit
        {
            float: right;
            padding-top: 40px;
            padding-right: 15px;
            width: 400px;
            text-align: right;
        }
        p.register
        {
            padding-right: 0px;
            margin-top: 28px;
        }
        .style5
        {
            float:left;
            width: 50%;
        }
        .style6
        {
            width: 377px;
        }
        .style7
        {
            width: 160px;
        }
        .accountsettings
        {
            float: left;
            margin: 30px auto auto 350px;
        }
        </style>
        <!-- jquery enter code -->
        <script type="text/javascript">
            $(document).ready(function () {
                $('[id$=txtUsername]').keydown(function () {
                    enterNoSubmit('[id$=txtPassword]');
                });
                $('[id$=txtPassword]').keydown(function () {
                    enterNoSubmit('[id$=txtCompanyName]');
                });
                $('[id$=txtCompanyName]').keydown(function () {
                    enterNoSubmit('[id$=txtdateFounded]');
                });
                $('[id$=txtdateFounded]').keydown(function () {
                    enterNoSubmit('[id$=txtWebsiteUrl]');
                });
                $('[id$=txtWebsiteUrl]').keydown(function () {
                    enterNoSubmit('[id$=txtContactNum]');
                });
                $('[id$=txtContactNum]').keydown(function () {
                    enterNoSubmit('[id$=txtAddress1]');
                });
                $('[id$=txtAddress1]').keydown(function () {
                    enterNoSubmit('[id$=txtAddress2]');
                });
                $('[id$=txtAddress2]').keydown(function () {
                    enterNoSubmit('[id$=txtAddress3]');
                });
                $('[id$=txtAddress3]').keydown(function () {
                    enterNoSubmit('[id$=txtPostalCode]');
                });
                $('[id$=txtPostalCode]').keydown(function () {
                    enterNoSubmit('[id$=txtMobileNumber]');
                });
                $('[id$=txtMobileNumber]').keydown(function () {
                    enterNoSubmit('[id$=txtNationality]');
                });
                $('[id$=txtNationality]').keydown(function () {
                    enterNoSubmit('[id$=ddlCountryOfResidence]');
                });
                $('[id$=ddlCountryOfResidence]').keydown(function () {
                    enterNoSubmit('[id$=txtAddress1]');
                });
                $('[id$=txtAddress1]').keydown(function () {
                    enterNoSubmit('[id$=txtAddress2]');
                });
                $('[id$=txtAddress2]').keydown(function () {
                    enterNoSubmit('[id$=Address3]');
                });
                $('[id$=Address3]').keydown(function () {
                    enterNoSubmit('[id$=txtPostalCode]');
                });
                $('[id$=txtPostalCode]').keydown(function () {
                    enterNoSubmit('[id$=txtFirstName]');
                });
                $('[id$=txtFirstName]').keydown(function () {
                    enterNoSubmit('[id$=ttxtLastName]');
                });
                $('[id$=txtLastName]').keydown(function () {
                    enterNoSubmit('[id$=txtEmail]');
                });
                $('[id$=txtEmail]').keydown(function () {
                    enterSubmit('[id$=btnSave]');
                });
            });
        </script>
</asp:Content>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="MainPlaceHolder">
    <div class="line_account">
    <!--Insert Account stuff here-->
    </div>
    
        <table width="100%">
            <tr>
            <td style="text-align: right" class="style7">
        <span class="req_field">*</span>Username:</td>
                <td>
        <asp:TextBox ID="txtUsername" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldUsername" runat="server" 
                    ErrorMessage="Required Field" ForeColor="Red" Display="Dynamic" 
                    Font-Size="X-Small" ControlToValidate="txtUsername"
                    ValidationGroup="RegisterGroup"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="RegularExpressionUsername" runat="server" 
                    ControlToValidate="txtUsername" Display="Dynamic" 
                    
                    
                    
                        
                        ErrorMessage="Username should contain only alphabets, numbers, and underscores" Font-Size="X-Small" 
                    ForeColor="Red" ValidationExpression="^[a-zA-Z0-9_]*$"
                    ValidationGroup="RegisterGroup"></asp:RegularExpressionValidator>
           
                <asp:CustomValidator ID="CustomUsername" runat="server" 
                    ControlToValidate="txtUsername" Display="Dynamic" ErrorMessage="Username already in use" 
                    Font-Size="X-Small" ForeColor="Red" ValidationGroup="RegisterGroup" 
                    onservervalidate="CustomUsername_ServerValidate"></asp:CustomValidator>
           
                </td>
            </tr>
            <tr>
            <td style="text-align: right" class="style7">
        <span class="req_field">*</span>Password:</td>
                <td>
        <asp:TextBox ID="txtPassword" runat="server" TextMode="Password"></asp:TextBox>
             <asp:RequiredFieldValidator ID="RequiredFieldPassword" runat="server" 
                    Display="Dynamic" ErrorMessage="Required Field" Font-Size="X-Small" 
                    ForeColor="Red" ControlToValidate="txtPassword"
                    ValidationGroup="RegisterGroup"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="RegularExpressionPassword" runat="server" 
                    ControlToValidate="txtPassword" Display="Dynamic" 
                    ErrorMessage="Password should contain only alphabets and numbers, and have a length of 6-18" Font-Size="X-Small" 
                    ForeColor="Red" ValidationExpression="^[a-zA-Z0-9]{6,18}$"
                    ValidationGroup="RegisterGroup"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
            <td style="text-align: right" class="style7">
        <span class="req_field">*</span>Re-enter Password:</td>
                <td>
        <asp:TextBox ID="txtReenterPassword" runat="server" TextMode="Password"></asp:TextBox>
             <asp:RequiredFieldValidator ID="RequiredFieldReenterPassword" runat="server" 
                    Display="Dynamic" ErrorMessage="Required Field" Font-Size="X-Small" 
                    ForeColor="Red" ControlToValidate="txtReenterPassword"
                    ValidationGroup="RegisterGroup"></asp:RequiredFieldValidator>
                <asp:CompareValidator ID="CompareValidatorPassword" runat="server" 
                    ControlToCompare="txtPassword" ControlToValidate="txtReenterPassword" 
                    ErrorMessage="Passwords do not match" Font-Size="X-Small" ForeColor="Red"
                    ValidationGroup="RegisterGroup"></asp:CompareValidator>
                </td>
            </tr>
                <tr>
            <td style="text-align: right;">
            <span class="req_field">*</span>Security Question:
            </td>
            <td>
                <asp:DropDownList ID="ddlSecurityQuestion" runat="server">
                    <asp:ListItem>Please select a security question</asp:ListItem>
                    <asp:ListItem>What is the name of your first teacher?</asp:ListItem>
                    <asp:ListItem>What is the name of your first pet?</asp:ListItem>
                    <asp:ListItem>What is the name of the first company you worked for?</asp:ListItem>
                    <asp:ListItem>What is the model of the first car you owned?</asp:ListItem>
                    <asp:ListItem>What was your favourite book as a child?</asp:ListItem>
                    <asp:ListItem>What was your favourite dessert as a child?</asp:ListItem>
                    <asp:ListItem>What was your favourite movie as a teenager?</asp:ListItem>
                    <asp:ListItem>Where did you take your first vacation?</asp:ListItem>
                    <asp:ListItem>Who was your favourite musical artist as a teenager?</asp:ListItem>
                </asp:DropDownList>
                <asp:RequiredFieldValidator ID="RequiredFieldSecurityQuestion" runat="server" 
                    Display="Dynamic" ErrorMessage="Required Field" Font-Size="X-Small" 
                    ForeColor="Red" ControlToValidate="ddlSecurityQuestion"
                    ValidationGroup="RegisterGroup" 
                    InitialValue="Please select a security question"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td style="text-align: right;">
            <span class="req_field">*</span>Security Answer:
            </td>
            <td>
        <asp:TextBox ID="txtSecurityAnswer" runat="server" MaxLength="18" 
                    Width="270px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldSecurityAnswer" runat="server" 
                    Display="Dynamic" ErrorMessage="Required Field" Font-Size="X-Small" 
                    ForeColor="Red" ControlToValidate="txtSecurityAnswer"
                    ValidationGroup="RegisterGroup"></asp:RequiredFieldValidator>
            </td>
        </tr>
        </table>
   

    <div class="line_companyinfo"></div>
    <!--Insert Company Information stuff here-->
        <table class="style5">
            <tr>
            <td style="text-align: right">
        <span class="req_field">*</span>Company Name:</td>
                <td class="style6">
                    <asp:TextBox ID="txtCompanyName" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldCoName" runat="server" 
                    ErrorMessage="Required Field" ForeColor="Red" Display="Dynamic" 
                    Font-Size="X-Small" ControlToValidate="txtCompanyName"
                    ValidationGroup="RegisterGroup"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
            <td style="text-align: right">
        <span class="req_field">*</span>Date Founded:</td>
                <td class="style6">
                    <asp:TextBox ID="txtDateFounded" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldDFounded" runat="server" 
                    ErrorMessage="Required Field" ForeColor="Red" Display="Dynamic" 
                    Font-Size="X-Small" ControlToValidate="txtdateFounded"
                    ValidationGroup="RegisterGroup"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="RegularExpressionDateFounded" runat="server" 
                    ControlToValidate="txtDateFounded" Display="Dynamic" 
                    ErrorMessage="Date founded must be dd-mm-yyyy" Font-Size="X-Small" 
                    ForeColor="Red" 
                    ValidationExpression="^(0[1-9]|[12][0-9]|3[01])[-](0[1-9]|1[012])[-](19|20)\d\d$"
                    ValidationGroup="RegisterGroup"></asp:RegularExpressionValidator>
           
                <asp:CustomValidator ID="CustomDateFounded" runat="server" 
                    ControlToValidate="txtDateFounded" Display="Dynamic" ErrorMessage="Date founded cannot be after today" 
                    Font-Size="X-Small" ForeColor="Red" ValidationGroup="RegisterGroup" 
                    onservervalidate="CustomDateFounded_ServerValidate"></asp:CustomValidator>
           
                </td>
            </tr>
            <tr>
            <td style="text-align: right">
                Contact Number:</td>
                <td class="style6">
                    <asp:TextBox ID="txtContactNum" runat="server"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionHP" runat="server" 
                    ControlToValidate="txtContactNum" ErrorMessage="Please enter only number" 
                    Font-Size="X-Small" ForeColor="Red" ValidationExpression="^[+]?\d+$"
                    ValidationGroup="RegisterGroup"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
            <td style="text-align: right">
                Website:</td>
                <td class="style6">
                    <asp:TextBox ID="txtWebsiteUrl" runat="server"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" 
                        runat="server" ControlToValidate="txtWebsiteUrl"
                        ErrorMessage="Invalid Website" Font-Size="X-Small" ForeColor="Red" 
                        ValidationExpression="http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&amp;=]*)?"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
            <td style="text-align: right">
            <span class="req_field">*</span>E-mail address:</td>
                <td class="style6">
                    <asp:TextBox ID="txtEmail" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldEmail" runat="server" 
                    ErrorMessage="Required Field" ForeColor="Red" Display="Dynamic" 
                    Font-Size="X-Small" ControlToValidate="txtEmail"
                    ValidationGroup="RegisterGroup"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="RegularExpressionCompanyEmail0"
                    runat="server" Display="Dynamic" ErrorMessage="E-mail address is invalid"
                    Font-Size="X-Small" ForeColor="Red" ControlToValidate="txtEmail"
                    ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" 
                    ValidationGroup="RegisterGroup"></asp:RegularExpressionValidator>
                
                <asp:CustomValidator ID="CustomEmail" runat="server" 
                    ControlToValidate="txtEmail" Display="Dynamic" ErrorMessage="E-mail address already in use" 
                    Font-Size="X-Small" ForeColor="Red" ValidationGroup="RegisterGroup" 
                    onservervalidate="CustomEmail_ServerValidate"></asp:CustomValidator>
           
                </td>
            </tr>
        </table>  
   

    <table class="style5">
            <tr>
            <td style="text-align: right">
        <span class="req_field">*</span>Address:</td>
            <td>
        <asp:TextBox ID="txtAddress1" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldAddress" runat="server" 
                    Display="Dynamic" ErrorMessage="Required Field" Font-Size="X-Small" 
                    ForeColor="Red" ControlToValidate="txtAddress1"
                    ValidationGroup="RegisterGroup"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td>
        <asp:TextBox ID="txtAddress2" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td>
        <asp:TextBox ID="txtAddress3" runat="server"></asp:TextBox>
            </td>
        </tr>
            <tr>
            <td style="text-align: right">
        <span class="req_field">*</span>ZIP/Postal code:</td>
                <td class="style6">
                    <asp:TextBox ID="txtPostalCode" runat="server" Width="128px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldPostalCode" runat="server" 
                    ErrorMessage="Required Field" ForeColor="Red" Display="Dynamic" 
                    Font-Size="X-Small" ControlToValidate="txtPostalCode"
                    ValidationGroup="RegisterGroup"></asp:RequiredFieldValidator>
                </td>
            </tr>
        </table>  
     
     <div class="line-clear"></div>
         <div class="accountsettings">
        <asp:CheckBoxList ID="cblAccountSettings" runat="server">
            <asp:ListItem>Do you wish to receive messages from other users?</asp:ListItem>
            <asp:ListItem>Do you wish to receive notifications from Hired.com?</asp:ListItem>
        </asp:CheckBoxList>
    </div>
    <div class="line-clear"></div>
    <div class="ca_submit">
        <asp:ImageButton ID="btnSave" runat="server" ImageUrl="~/Images/caBtnSave.png" 
            onclick="btnSave_Click" ValidationGroup="RegisterGroup" />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <a href="javascript:caBtnCancel_Click()" onmouseover="this.style.cursor='hand'"><img src="images/caBtnCancel.png" /></a>
    </div>
</asp:Content>
